package com.ruoyi.basebill.mapper;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import com.ruoyi.basebill.domain.OmsStocktransferbill;
import com.ruoyi.basebill.domain.OmsStocktransferbillentry;
import org.apache.ibatis.annotations.Param;

/**
 * 库存调拨单Mapper接口
 * 
 * @author xiefeng
 * @date 2023-02-15
 */
public interface OmsStocktransferbillMapper 
{
    /**
     * 查询库存调拨单
     * 
     * @param id 库存调拨单主键
     * @return 库存调拨单
     */
    public OmsStocktransferbill selectOmsStocktransferbillById(Long id);


    public List<OmsStocktransferbill> selectOmsStocktransferbillByIds(@Param("list") HashSet<Long> ids);

    /**
     * 查询库存调拨单列表
     * 
     * @param omsStocktransferbill 库存调拨单
     * @return 库存调拨单集合
     */
    public List<OmsStocktransferbill> selectOmsStocktransferbillList(OmsStocktransferbill omsStocktransferbill);

    public List<OmsStocktransferbill> selectOmsStocktransferbillDetailList(OmsStocktransferbill omsStocktransferbill);


    /**
     * 新增库存调拨单
     * 
     * @param omsStocktransferbill 库存调拨单
     * @return 结果
     */
    public int insertOmsStocktransferbill(OmsStocktransferbill omsStocktransferbill);

    /**
     * 修改库存调拨单
     * 
     * @param omsStocktransferbill 库存调拨单
     * @return 结果
     */
    public int updateOmsStocktransferbill(OmsStocktransferbill omsStocktransferbill);

    /**
     * 删除库存调拨单
     * 
     * @param id 库存调拨单主键
     * @return 结果
     */
    public int deleteOmsStocktransferbillById(Long id);

    /**
     * 批量删除库存调拨单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsStocktransferbillByIds(Long[] ids);

    /**
     * 批量删除库存调拨单分录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsStocktransferbillentryByParentids(Long[] ids);
    
    /**
     * 批量新增库存调拨单分录
     * 
     * @param omsStocktransferbillentryList 库存调拨单分录列表
     * @return 结果
     */
    public int batchOmsStocktransferbillentry(List<OmsStocktransferbillentry> omsStocktransferbillentryList);
    

    /**
     * 通过库存调拨单主键删除库存调拨单分录信息
     * 
     * @param id 库存调拨单ID
     * @return 结果
     */
    public int deleteOmsStocktransferbillentryByParentid(Long id);

    int updateSumBillNumberByIds(@Param("sumBillNumber") String sumBillNumber, @Param("ids") ArrayList<Long> ids);

    List<OmsStocktransferbill> selectSumBillNumberIsNull();
}
